package com.ruoyi.project.web.tRoominfo.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.web.tRoominfo.mapper.TRoominfoMapper;
import com.ruoyi.project.web.tRoominfo.domain.TRoominfo;
import com.ruoyi.project.web.tRoominfo.service.ITRoominfoService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 房间 服务层实现
 * 
 * @author ruoyi
 * @date 2021-07-06
 */
@Service
public class TRoominfoServiceImpl implements ITRoominfoService 
{
	@Autowired
	private TRoominfoMapper tRoominfoMapper;

	/**
     * 查询房间信息
     * 
     * @param id 房间ID
     * @return 房间信息
     */
    @Override
	public TRoominfo selectTRoominfoById(String id)
	{
	    return tRoominfoMapper.selectTRoominfoById(id);
	}
	
	/**
     * 查询房间列表
     * 
     * @param tRoominfo 房间信息
     * @return 房间集合
     */
	@Override
	public List<TRoominfo> selectTRoominfoList(TRoominfo tRoominfo)
	{
	    return tRoominfoMapper.selectTRoominfoList(tRoominfo);
	}
	
    /**
     * 新增房间
     * 
     * @param tRoominfo 房间信息
     * @return 结果
     */
	@Override
	public int insertTRoominfo(TRoominfo tRoominfo)
	{
	    return tRoominfoMapper.insertTRoominfo(tRoominfo);
	}
	
	/**
     * 修改房间
     * 
     * @param tRoominfo 房间信息
     * @return 结果
     */
	@Override
	public int updateTRoominfo(TRoominfo tRoominfo)
	{
	    return tRoominfoMapper.updateTRoominfo(tRoominfo);
	}

	/**
     * 删除房间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTRoominfoByIds(String ids)
	{
		return tRoominfoMapper.deleteTRoominfoByIds(Convert.toStrArray(ids));
	}
	
}
